package handler

import (
	"bytes"
	"encoding/binary"

	"github.com/cz-it/gonnectd/src/proto"
)

type Logout struct {
}

func NewLogout() *Logout {
	logout := new(Logout)
	return logout
}

func (logout *Logout) Proc(body proto.Body) []byte {
	buf := new(bytes.Buffer)
	binary.Write(buf, binary.BigEndian, []byte("logout"))
	return buf.Bytes()
}
